package Invalid;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;


public class SSLFakeClient {
	public static void main(){
		try
	    {
	      SSLSocketFactory sslSocketFactory = (SSLSocketFactory)SSLSocketFactory.getDefault();
	      SSLSocket sslSocket = (SSLSocket)sslSocketFactory.createSocket("", 1333);
	      InputStream inputstream = System.in;
	      InputStreamReader inputstreamreader = new InputStreamReader(inputstream);
	      BufferedReader bufferedreader = new BufferedReader(inputstreamreader);
	      OutputStream outputstream = sslSocket.getOutputStream();
	      OutputStreamWriter outputstreamwriter = new OutputStreamWriter(outputstream);
	      BufferedWriter bufferedwriter = new BufferedWriter(outputstreamwriter);
	      String string = null;
	      while ((string = bufferedreader.readLine()) != null)
	      {
	        bufferedwriter.write("Message receved\n");
	        bufferedwriter.flush();
	      }
	    }
	    catch (Exception exception)
	    {
	      exception.printStackTrace();
	    }
	}
}
